package chapter4_2.chapter4_2_2;

/**
 * @author dmc
 */
public class Student {

    public void learn(){
        System.out.println("学生 学习!");

        Dog dog = new Dog();
        dog.wangwang();

        Cat cat = new Cat();
        cat.miaomiao();
        }
    }


class Dog{
    public void wangwang(){
        System.out.println("狗： 汪汪！");
    }
}

class Cat{
    public void miaomiao(){
        System.out.println("猫： 喵喵！");
    }
}
